import request from '@/utils/request'

// 获取权限列表
export const getPermListAPI = () => {
  return request({
    method: 'get',
    url: '/sys/permission'
  })
}

// 新增权限
export const postPermAPI = (permForm) => {
  return request({
    method: 'post',
    url: '/sys/permission',
    data: permForm
  })
}

// 修改权限
export const putPermAPI = (permForm) => {
  return request({
    method: 'put',
    url: `/sys/permission/${permForm.id}`,
    data: permForm
  })
}

// 删除权限
export const delPermAPI = (id) => {
  return request({
    method: 'delete',
    url: `/sys/permission/${id}`
  })
}

// 获取权限点详情
export const getPermDetailAPI = (id) => {
  return request({
    method: 'get',
    url: `/sys/permission/${id}`
  })
}
